﻿Imports Models.Security

Namespace Solution

    Public Class UserSolutionVO
        Inherits BaseVO

        Private _userSolutionId As Integer

        Private _solutionId As Integer
        Private _solution As SolutionVO

        Private _permissionId As Integer
        Private _permission As PermissionVO

        'Private _userCompanies As New Generic.List(Of UserCompaniesVO)

        Sub New()
        End Sub

        Sub New(entity As Data.BaseModel.UserSolution)
            If entity IsNot Nothing Then
                userSolutionId = entity.UserSolutionId
                solutionId = entity.SolutionId
                If entity.Solution IsNot Nothing Then
                    solution = New SolutionVO(entity.Solution)
                End If
                permissionId = entity.PermissionId
                If entity.Permission IsNot Nothing Then
                    permission = New PermissionVO(entity.Permission)
                End If

                'If entity.UserCompanies IsNot Nothing Then
                '    For Each oItem As Data.BaseModel.UserCompanie In entity.UserCompanies
                '        userCompanies.Add(New UserCompaniesVO(oItem))
                '    Next
                'End If

            End If
        End Sub

        Public Property userSolutionId As Integer
            Get
                Return _userSolutionId
            End Get
            Set(value As Integer)
                _userSolutionId = value
            End Set
        End Property
        Public Property solutionId As Integer
            Get
                Return _solutionId
            End Get
            Set(value As Integer)
                _solutionId = value
            End Set
        End Property
        Public Property solution As SolutionVO
            Get
                Return _solution
            End Get
            Set(value As SolutionVO)
                _solution = value
            End Set
        End Property
        Public Property permissionId As Integer
            Get
                Return _permissionId
            End Get
            Set(value As Integer)
                _permissionId = value
            End Set
        End Property
        Public Property permission As PermissionVO
            Get
                Return _permission
            End Get
            Set(value As PermissionVO)
                _permission = value
            End Set
        End Property

        'Public Property userCompanies As Generic.List(Of UserCompaniesVO)
        '    Get
        '        Return _userCompanies
        '    End Get
        '    Set(ByVal value As Generic.List(Of UserCompaniesVO))
        '        _userCompanies = value
        '    End Set
        'End Property

    End Class

End Namespace